<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/30
  Time: 21:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title>个人中心</title>
    <link href="${pageContext.request.contextPath}/layui/css/layui.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/layui/layui.js"></script>
    <style>
        body{
            font-family: 宋体;
        }
        .address-left{
            width: 220px;
            height: 280px;
            margin-left: 350px;
            margin-top: 10px;
            margin-bottom: 10px;
            border: 1px solid #848484;
            float: left;
            border-collapse: collapse;
            box-sizing: border-box;
        }
        .address-left tr{
            height: 40px;
            /* border: 1px solid #848484; */
        }
        .address-left1-1{
            background-color: #f27521;
            color: white;
            height: 40px;
            text-align: center;
            line-height: 40px;
        }
        .address-left2{
            background-color: #f4f4f4;
            font-weight: bold;
            width: 100%;
            border-bottom: 3px solid orange;
        }
        .address-left2-1img{
            height: 30px;
            padding-top: 5px;
            box-sizing: border-box;
            margin-left: 5px;
        }
        .address-left2-1{
            line-height: 30px;

        }
        .address-left3{
            border-bottom: 1px dashed darkgray;
        }

        .address-font{
            color: orange;
        }
        .header-bottom-search{
            padding-left: 350px;
        }
        .Myorder-head{
            width: 850px;
            margin-top: 10px;
            margin-left: 580px;
            height: 220px;
            border: 1px solid #848484;
        }
        .Myorder-head1{
            padding-left: 30px;
            height: 30px;
            line-height: 30px;
            background-color: #FF5722;
            color: white;
        }
        .Myborder-img{
            height: 100px;
            width: 100px;
            padding-left: 20px;
        }
        .Myorder-head2{
            height: 30px;
            width: 100px;
            margin-left: 20px;
            line-height: 30px;
            font-size: 20px;
            font-weight: bold;
        }
        .Myorder-head3{
            height: 110px;
        }
        .Myorder-head3-1,.Myorder-head3-2{
            height: 30px;
            line-height: 30px;
            color: #848484;
        }
        .Myorder-head3-2{
            background-color: #F6F6F6;
        }
        .Myorder-head3-text{
            color: red;
        }
        .Myorder-head4{
            /* clear: both; */
            width: 100px;
            height: 50px;
            padding-left: 20px;
            line-height: 30px;
            text-align: center;
        }
        .Myorder-head4-text{
            text-decoration: none;
            color: #01AAED;
        }
        .Myorder-title{
            width: 850px;
            height: 50px;
            margin-left: 580px;
            line-height: 50px;
            padding-left: 40px;
            border-bottom: 1px dashed  #848484;
            font-size: 20px;
            font-weight: bold;
        }
        .Myorder{
            clear: both;
            width: 850px;
            height: 220px;
            margin-top: 5px;
            margin-left: 580px;
            /* margin-bottom: 10px; */
            border: 1px solid #848484;
            border-collapse: collapse;
        }
        .Myorder-a{
            margin-top: 0;
        }
        .Myorder-a,.Myorder-b{
            height: 44px;
            line-height: 44px;
            text-align: center;
            border-bottom: 1px solid #848484;
        }
        .Myorder-a{
            background-color: #FFB800;
            font-weight: bold;
        }
        .order-num{
            color: #FF5722;
        }
        .Myorder-c{
            height: 50px;
            line-height: 50px;
            text-align: right;

        }
        .Myorder-c-text{
            color: #01AAED;
        }
    </style>i
</head>
<body>
<%--商城logo--%>
<%@include file="headtop.jsp"%>
<%--商城分类--%>
<%@include file="headmid.jsp"%>
<%--搜索框引入--%>
<%@ include file="search.jsp"%>


<!-- 会员中心 -->
<table class="address-left">
    <tr class="address-left1">
        <td><a href="javascript:void(0)">
            <div class="address-left1-1">会员中心</div>
        </a>
        </td>
    </tr>
    <tr class="address-left2">
        <td>
            <div class="address-left2-1"><a href="javascript:void(0)"></a>
                <img   class="address-left2-1img" src="${pageContext.request.contextPath}/img/trading.png"/>
                交易记录</div>
        </td>
    </tr>
    <tr class="address-left3">
        <td>
            <ul type="square" >
                <li><a href="javascript:void(0)">
                    我的订单</a></li>
            </ul>
        </td>
    </tr>
    <tr class="address-left2">
        <td>
            <div class="address-left2-1"><a href="javascript:void(0)">
                <img class="address-left2-1img" src="${pageContext.request.contextPath}/img/setting.png"/>
                个人设置</a></div>
        </td>
    </tr>
    <tr class="address-left3">
        <td>
            <ul type="square">
                <li><a href="javascript:void(0)">
                    地址管理</a></li>
            </ul>
        </td>
    </tr>
    <tr class="address-left3">
        <td>
            <ul type="square">
                <li><a href="javascript:void(0)">
                    修改头像</a></li>
            </ul>
        </td>
    </tr>
    <tr class="address-left3">
        <td>
            <ul type="square">
                <li><a href="javascript:void(0)">
                    修改密码</a></li>
            </ul>
        </td>
    </tr>
</table>

<c:if test="${not empty user}">
    <!-- 个人信息中心 -->
    <div class="Myorder-head layui-container" style="width: 850px;
            margin-top: 10px;
            margin-left: 580px;
            height: 220px;
            border: 1px solid #848484;">
        <div class="Myorder-head1">
            <div class="layui-col-md12">
                你好，${user.username }! 欢迎回来！
            </div>
        </div>
        <div class="Myorder-head2">
            <div class="layui-col-md9-offset3">用户信息</div>
        </div>
        <div class="Myorder-head3">
            <div class="layui-col-md2">
                <img src="${pageContext.request.contextPath}/img/girl.png" class="Myborder-img"/>
            </div>
            <div class="layui-col-md10">
                <div class="layui-row Myorder-head3-1">
                    <div class="layui-col-md4">
                        你的订单交易总数量:
                        <span class="Myorder-head3-text">2笔</span>
                    </div>
                    <div class="layui-col-md6-offset2">
                        <a href="#" class="Myorder-head4-text">进入订单列表</a>
                    </div>

                </div>
                <div class="layui-row Myorder-head3-1">
                    <div class="layui-col-md12">
                        总消费额:
                        <span class="Myorder-head3-text">￥2040.00</span>
                    </div>
                </div>
                <div class="layui-row Myorder-head3-2">
                    <div class="layui-col-md3">
                        待评价商品:(
                        <span class="Myorder-head3-text">1</span>
                        )
                    </div>
                    <div class="layui-col-md3">
                        待付款订单:(
                        <span class="Myorder-head3-text">0</span>
                        )
                    </div>
                    <div class="layui-col-md3">
                        待确认收货:(0)
                    </div>
                </div>
            </div>
        </div>
        <div class="Myorder-head4">
            <div class="layui-col-md9-offset3">
                <a href="#" class="Myorder-head4-text">修改头像</a>
            </div>
        </div>
    </div>

    <div class="layui-container Myorder-title" style="
 width: 850px;
            height: 50px;
            margin-left: 580px;
            line-height: 50px;
            padding-left: 40px;
            border-bottom: 1px dashed  #848484;
            font-size: 20px;
            font-weight: bold;">
        我的订单
    </div>

    <div class="layui-container Myorder" style=" clear: both;
            width: 850px;
            height: 220px;
            margin-top: 5px;
            margin-left: 580px;
            /* margin-bottom: 10px; */
            border: 1px solid #848484;
            border-collapse: collapse;">
        <div class=" Myorder-a">
            <div class="layui-col-md3">订单编号</div>
            <div class="layui-col-md3">下单日期</div>
            <div class="layui-col-md6">
                <div class="layui-row">
                    <div class="layui-col-md3">收货人</div>
                    <div class="layui-col-md3">支付方式</div>
                    <div class="layui-col-md3">总金额</div>
                    <div class="layui-col-md3">订单状态</div>
                </div>
            </div>
        </div>
        <div class=" Myorder-b">
            <div class="layui-col-md3 order-num">订单编号</div>
            <div class="layui-col-md3">下单日期</div>
            <div class="layui-col-md6">
                <div class="layui-row">
                    <div class="layui-col-md3">收货人</div>
                    <div class="layui-col-md3">支付方式</div>
                    <div class="layui-col-md3">总金额</div>
                    <div class="layui-col-md3">订单状态</div>
                </div>
            </div>
        </div>
        <div class=" Myorder-b">
            <div class="layui-col-md3 order-num">订单编号</div>
            <div class="layui-col-md3">下单日期</div>
            <div class="layui-col-md6">
                <div class="layui-row">
                    <div class="layui-col-md3">收货人</div>
                    <div class="layui-col-md3">支付方式</div>
                    <div class="layui-col-md3">总金额</div>
                    <div class="layui-col-md3">订单状态</div>
                </div>
            </div>
        </div>
        <div class=" Myorder-c">
            <div class="layui-col-md4-offset7">
                <a href="#"  class=" Myorder-c-text">
                    更多订单&gt;&gt;
                </a>
            </div>
        </div>
    </div>
</c:if>


<%--用户未登录时隐藏个人内容
        后期可通过过滤器进行权限限制
        未登录情况下访问，跳转回登录页面
--%>
<c:if test="${empty user}">
    <!-- 个人信息中心 -->
    <div class="Myorder-head layui-container" style="width: 850px;
            margin-top: 10px;
            margin-left: 580px;
            height: 220px;
            border: 1px solid #848484; display: none;">
        <div class="Myorder-head1">
            <div class="layui-col-md12">
                你好，张三！欢迎回来！
            </div>
        </div>
        <div class="Myorder-head2">
            <div class="layui-col-md9-offset3">用户信息</div>
        </div>
        <div class="Myorder-head3">
            <div class="layui-col-md2">
                <img src="${pageContext.request.contextPath}/img/girl.png" class="Myborder-img"/>
            </div>
            <div class="layui-col-md10">
                <div class="layui-row Myorder-head3-1">
                    <div class="layui-col-md4">
                        你的订单交易总数量:
                        <span class="Myorder-head3-text">2笔</span>
                    </div>
                    <div class="layui-col-md6-offset2">
                        <a href="#" class="Myorder-head4-text">进入订单列表</a>
                    </div>

                </div>
                <div class="layui-row Myorder-head3-1">
                    <div class="layui-col-md12">
                        总消费额:
                        <span class="Myorder-head3-text">￥2040.00</span>
                    </div>
                </div>
                <div class="layui-row Myorder-head3-2">
                    <div class="layui-col-md3">
                        待评价商品:(
                        <span class="Myorder-head3-text">1</span>
                        )
                    </div>
                    <div class="layui-col-md3">
                        待付款订单:(
                        <span class="Myorder-head3-text">0</span>
                        )
                    </div>
                    <div class="layui-col-md3">
                        待确认收货:(0)
                    </div>
                </div>
            </div>
        </div>
        <div class="Myorder-head4">
            <div class="layui-col-md9-offset3">
                <a href="#" class="Myorder-head4-text">修改头像</a>
            </div>
        </div>
    </div>

    <div class="layui-container Myorder-title" style="
 width: 850px;
            height: 50px;
            margin-left: 580px;
            line-height: 50px;
            padding-left: 40px;
            border-bottom: 1px dashed  #848484;
            font-size: 20px;
            font-weight: bold; display: none;">
        我的订单
    </div>

    <div class="layui-container Myorder" style=" clear: both;
            width: 850px;
            height: 220px;
            margin-top: 5px;
            margin-left: 580px;
            /* margin-bottom: 10px; */
            border: 1px solid #848484;
            border-collapse: collapse; display: none;">
        <div class=" Myorder-a">
            <div class="layui-col-md3">订单编号</div>
            <div class="layui-col-md3">下单日期</div>
            <div class="layui-col-md6">
                <div class="layui-row">
                    <div class="layui-col-md3">收货人</div>
                    <div class="layui-col-md3">支付方式</div>
                    <div class="layui-col-md3">总金额</div>
                    <div class="layui-col-md3">订单状态</div>
                </div>
            </div>
        </div>
        <div class=" Myorder-b">
            <div class="layui-col-md3 order-num">订单编号</div>
            <div class="layui-col-md3">下单日期</div>
            <div class="layui-col-md6">
                <div class="layui-row">
                    <div class="layui-col-md3">收货人</div>
                    <div class="layui-col-md3">支付方式</div>
                    <div class="layui-col-md3">总金额</div>
                    <div class="layui-col-md3">订单状态</div>
                </div>
            </div>
        </div>
        <div class=" Myorder-b">
            <div class="layui-col-md3 order-num">订单编号</div>
            <div class="layui-col-md3">下单日期</div>
            <div class="layui-col-md6">
                <div class="layui-row">
                    <div class="layui-col-md3">收货人</div>
                    <div class="layui-col-md3">支付方式</div>
                    <div class="layui-col-md3">总金额</div>
                    <div class="layui-col-md3">订单状态</div>
                </div>
            </div>
        </div>
        <div class=" Myorder-c">
            <div class="layui-col-md4-offset7">
                <a href="#"  class=" Myorder-c-text">
                    更多订单&gt;&gt;
                </a>
            </div>
        </div>
    </div>
</c:if>




<!-- 底栏属性 -->
<%@include file="helpinfo.jsp"%>
<!-- 尾栏 -->
<%@include file="footer.jsp"%>

</body>


<script>
    layui.use(['upload', 'element', 'layer'], function(){
        var $ = layui.jquery
            ,upload = layui.upload
            ,element = layui.element
            ,layer = layui.layer;

        //总页数低于页码总数
        laypage.render({
            elem: 'demo0'
            ,count: 50 //数据总数
        });

</script>
</html>

